package com.wanxi.listener;

import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.annotation.Queue;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.messaging.handler.annotation.Headers;
import org.springframework.messaging.handler.annotation.Payload;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.util.Map;

/**
 * @Author:Doteon
 * @createDate:2023/3/7
 * @version: 1.0
 */
@Component
@Slf4j
public class UserMqListener {
    @RabbitListener(queuesToDeclare = @Queue("wx.fuzhuang.user"))
    public static void receive(String message, @Payload String body, @Headers Map headers){
        log.info("payload:{}",body);
//        log.info("headers:{}",headers);
//        log.info("HR收到消息，消息内容是: {}",message);
    }
}
